﻿<controls:ChildWindow
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
           xmlns:controlsToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" x:Class="SUMO.MediaBrowser.Controls.UploadWindow"
           Width="400" Height="300" 
           Title="Uploads" mc:Ignorable="d">
    <Grid x:Name="LayoutRoot" Margin="2">
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <ListBox x:Name="PendingList">
            <ListBox.ItemsPanel>
                <ItemsPanelTemplate>
                    <controlsToolkit:WrapPanel></controlsToolkit:WrapPanel>
                </ItemsPanelTemplate>
            </ListBox.ItemsPanel>

            <ListBox.Template>
                <ControlTemplate>
                    <Grid>
                        <ScrollViewer>
                            <ItemsPresenter />
                        </ScrollViewer>
                    </Grid>
                </ControlTemplate>
            </ListBox.Template>

            <ListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        
                        <!-- original -->
                        <StackPanel Orientation="Vertical">
                            <TextBlock Text="Original"></TextBlock>
                            <Image Width="100" Height="100" Source="{Binding OriginalData, Converter={StaticResource ByteImageConverter}}" />    
                        </StackPanel>
                        <!-- new -->
                        <StackPanel Orientation="Vertical">
                            <TextBlock Text="Modified"></TextBlock>
                            <Image Width="100" Height="100" Source="{Binding ItemData, Converter={StaticResource ByteImageConverter}}" />
                        </StackPanel>
                        <!-- status -->
                        <StackPanel VerticalAlignment="Center"  Orientation="Vertical">
                            <TextBlock Text="Status:" />
                            <TextBlock Text="{Binding Converter={StaticResource MediaItemStatusTextConverter}}" />
                        </StackPanel>
                        
                    </StackPanel>
                </DataTemplate>
            </ListBox.ItemTemplate>

        </ListBox>


        <Button x:Name="BeginUploadButton" Content="Begin Upload" Click="BeginUploadButton_Click" Width="150" Height="23" HorizontalAlignment="Left" Margin="0,12,0,0" Grid.Row="1" />
        
        <Button x:Name="CloseButton" Content="Close" Click="CloseButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,12,0,0" Grid.Row="1" />
    	
     </Grid>
</controls:ChildWindow>